package com.pine.sunshineelder.staff.ao;

import java.io.Serializable;
import java.time.LocalDate;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

import lombok.Data;

@Data
public class StaffAddAo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2497955009706309191L;
	@NotBlank
	private String no;// 员工编号
	private String title;// 职称
	private String remark;// 备注
	private String introUrl;// 详情
	private int male;// 性别
	@NotBlank
	private String workPhone;// 工作电话
	@NotBlank
	private String privatePhone;// 私人电话
	private LocalDate employedDate;// 入职时间
	@Email
	private String email;// 电子邮箱
	private String wechat;// 微信
	@NotBlank
	private String address;// 家庭地址
	private String image;// 照片
	@NotBlank
	@Pattern(regexp ="\\d{15}|\\d{18}" ,message="身份证号只能为15或18位")
	private String idCard;// 身份证号
	private LocalDate birthday;// 出生日期
	// 账户
	@NotBlank
	@Length(min = 2, max = 16, message = "名字长度在2-16之间")
	private String name;//名字
	@NotBlank
	@Length(min = 6, max = 16, message = "账号长度在6-16之间")
	@Pattern(regexp = "\\w+", message = "账号只能为数字或英文")
	private String account;//账户号码
	private int role;//角色
	@NotBlank
	private String createUserId;//创建人id

}
